<div data-ng-controller="UserEntryCtrl">
	<div class="page-header">
		<h3>Users</h3>
	</div>
	<div ng-show="error" class="alert alert-danger" role="alert">
		<strong>Error!</strong> {{error}}
	</div>
	<div class="row">
		<div class="col-sm-6 col-md-4">
			<form name="form" novalidate role="form" data-ng-submit="save()">
				<div class="form-group" data-ng-class="{'has-error': form.user.username.$invalid && form.user.username.$touched}">
					<label>User Name</label>
					<input type="email" class="form-control" placeholder="User Name" ng-model="user.username" required>
				</div>
				<div class="form-group" data-ng-class="{'has-error': form.user.password.$invalid && form.user.password.$touched}">
					<label>Password</label>
					<input type="password" class="form-control" placeholder="User Name" ng-model="user.password" required>
				</div>
				<div class="form-group">
					<label>Confirm Password</label>
					<input type="password" class="form-control" placeholder="User Name" ng-model="user.confirmpassword">
				</div>
				
				<h5>Roles</h5><hr/>
				<div class="checkbox disabled">
				  <label>
				    <input type="checkbox" checked="checked" disabled>
				    User
				  </label>
				</div>
				<div class="checkbox">
				  <label>
				    <input type="checkbox" ng-model="user.admin">
				    Admin
				  </label>
				</div>
				
				<a ng-hide="form.$dirty" class="btn btn-default" href="#/users" role="button">Back</a>
				<a ng-show="form.$dirty" class="btn btn-default" href="#/users" role="button">Cancel</a>
				<button ng-show="form.$dirty" type="button" class="btn btn-primary" ng-click="save()">Save</button>
			</form>
		</div>
	</div>
</div>
